import { ICompiler } from '@/render/store/baseconfig/types'
import wmcRequest from '..'
export function addCompilers(compiler: ICompiler): any {
  return wmcRequest.post({
    url: '/compilers',
    data: {
      compiler: compiler
    }
  })
}

export function getAllCompilers(): any {
  return wmcRequest.get({
    url: '/compu'
  })
}

export function deleteCompiler(name: string): any {
  return wmcRequest.delete({
    url: `/compilers/${name}`
  })
}

export function updateCompiler(compiler: ICompiler): any {
  return wmcRequest.patch({
    url: '/compilers',
    data: {
      compiler
    }
  })
}
